]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
layout: Show and hide keyboard using translation_y
authorJonas Dreßler <verdre@v0yd.nl>
Thu, 20 Feb 2020 13:23:01 +0000 (14:23 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Fri, 21 Feb 2020 12:59:21 +0000 (12:59 +0000)
ClutterActors anchor-y property is deprecated, which means we get a
warning when animating it, so use the translation property instead to
show or hide the osk.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1039

js/ui/layout.js

index c7dd6287f7a6fb858ea20d7587a5b293c2c93420..a02cab641534a940f1687d4b8504921f4ae49202 100644 (file)
@@ -738,7 +738,7 @@ var LayoutManager = GObject.registerClass({
     showKeyboard() {
         this.keyboardBox.show();
         this.keyboardBox.ease({
-            anchor_y: this.keyboardBox.height,
+            translation_y: -this.keyboardBox.height,
             opacity: 255,
             duration: KEYBOARD_ANIMATION_TIME,
             mode: Clutter.AnimationMode.EASE_OUT_QUAD,
@@ -755,7 +755,7 @@ var LayoutManager = GObject.registerClass({
         this._updateRegions();
 
         this._keyboardHeightNotifyId = this.keyboardBox.connect('notify::height', () => {
-            this.keyboardBox.anchor_y = this.keyboardBox.height;
+            this.keyboardBox.translation_y = -this.keyboardBox.height;
         });
     }
 
@@ -765,7 +765,7 @@ var LayoutManager = GObject.registerClass({
             this._keyboardHeightNotifyId = 0;
         }
         this.keyboardBox.ease({
-            anchor_y: 0,
+            translation_y: this.keyboardBox.height,
             opacity: 0,
             duration: immediate ? 0 : KEYBOARD_ANIMATION_TIME,
             mode: Clutter.AnimationMode.EASE_IN_QUAD,